<html><head><title>PathLength</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">PathLength()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result.d = <font color="#006666"><b>PathLength</b></font>()</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Returns the total length of the current vector drawing path. 

</blockquote><p><b>Parameters</b></p><blockquote>
None.


</blockquote><p><b>Return value</b></p><blockquote>

Returns the length of the current path. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">If</font></b> <font color="#006666">OpenWindow</font>(0, 0, 0, 400, 200, &quot;VectorDrawing&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#006666">    CanvasGadget</font>(0, 0, 0, 400, 200)

    <b><font color="#006666">If</font></b> <font color="#006666">StartVectorDrawing</font>(<font color="#006666">CanvasVectorOutput</font>(0))
    
      <font color="#006666">; construct path</font>
<font color="#006666">      MovePathCursor</font>(150, 125)
<font color="#006666">      AddPathCurve</font>(0, 270, 0, -150, 350, 180)
      
      <font color="#006666">; get length</font>
      <b><font color="#006666">Debug</font></b> &quot;Path length: &quot; +<font color="#006666"> PathLength</font>()

      <font color="#006666">; stroke the path</font>
<font color="#006666">      VectorSourceColor</font>($FF0000FF)
<font color="#006666">      StrokePath</font>(5)

<font color="#006666">      StopVectorDrawing</font>()
    <b><font color="#006666">EndIf</font></b>
    
    <b><font color="#006666">Repeat</font></b>
      Event =<font color="#006666"> WaitWindowEvent</font>()
    <b><font color="#006666">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#006666">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="pathpointx.html">PathPointX()</a>, <a href="pathpointy.html">PathPointY()</a>, <a href="pathpointangle.html">PathPointAngle()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=pathcursory.html>PathCursorY()</a> - <a href=index.html>VectorDrawing Index</a> - <a href=pathpointangle.html>PathPointAngle()</a> -><br><br>

</body></html>